package com.yanmaohu.nikita.data.function;

import com.yanmaohu.nikita.data.expression.Expression;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class ArgumentList {

    private int beginIndex;
    private int endIndex;
    private List<Expression> argumentList;

    public ArgumentList(int beginIndex, int endIndex, List<Expression> argumentList) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.argumentList = argumentList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public boolean isEmpty() {
        if (argumentList == null) {
            return true;
        }
        return argumentList.isEmpty();
    }

    public int size() {
        if (argumentList == null) {
            return 0;
        }
        return argumentList.size();
    }

    public Expression get(int index) {
        return argumentList.get(index);
    }

}
